package ulteam.land.session;

import java.util.ArrayList;
import java.util.Collection;

import javax.ejb.EJB;
import javax.ejb.Stateful;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import ulteam.land.entity.Banque;
import ulteam.land.entity.Employeur;
import ulteam.land.entity.EntGLOB;
import ulteam.land.entity.EntLUDO;
import ulteam.land.entity.Entreprise;
import ulteam.land.entity.Etat;
import ulteam.land.entity.Machine;
import ulteam.land.exceptions.LandException;

@Stateful(mappedName="maitreJeu")

public class MaitreJeuBean implements MaitreJeu{
	
	@EJB
	protected MoteurJeuLocal mj;
	protected boolean connecte;
	
	public boolean isConnecte() {
		return connecte;
	}
	
	public void connecter()
	{
		connecte = true;
	}
	
	public void deconnecter()
	{
		connecte = false;
	}
	
	public void initialisationjeu(int nbEntGLOB, int nbEntLUDO, int nbBanques, int nbLandiens, 
			double salaireMin, int immigrationMax, String nom, boolean p)
	{
		mj.initialisationjeu(nbEntGLOB, nbEntLUDO, nbBanques, nbLandiens, 
				salaireMin, immigrationMax, nom, p);
	}
	
	public void demarrerJeu()
	{
		mj.setJeuDemarre();
	}
}